﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GNSCore.Model.Context;

namespace GNSCore.Repositories
{
    /// <summary>
    /// Base repository, defines base dao methods
    /// </summary>
    /// <typeparam name="T">Concrete type</typeparam>
    public interface IRepository<T>
    {
        void SetContext(IGNSContext context);
        IQueryable<T> GetAll<T>();
        T GetById(int Id);
        void Add(T item);
        void Save(T item);
        void RemoveById(int Id);
        void Remove(T item);
        Int32 SaveChanges(bool acceptchanges);
    }
}